package org.jeecg.modules.manage.vo;

import lombok.Data;
import org.jeecg.common.util.oConvertUtils;
import org.jeecgframework.poi.excel.annotation.Excel;

import java.io.Serializable;

/**
 * @Description: 签约人才导入VO
 * @Author: yfkj
 * @Date:   2023-01-12
 * @Version: V1.0
 */
@Data
public class SigningMemberImportVo implements Serializable,Comparable<SigningMemberImportVo> {
    private static final long serialVersionUID = 1L;


	/**编码*/
    @Excel(name = "编码", width = 15)
    private String code;

	/**姓名*/
    @Excel(name = "姓名", width = 15)
    private String name;

	/**手机号码*/
    @Excel(name = "手机号码", width = 15)
    private String phone;

	/**证件类型：1-身份证，2-港澳台通行证，3-护照，4-军官证*/
    @Excel(name = "证件类型", width = 15)
    private Integer idCardType;

	/**身份证号码*/
    @Excel(name = "证件号码", width = 15)
    private String idCard;

    @Override
    public int compareTo(SigningMemberImportVo o) {
        //比较条件我们定的是按照code的长度升序
        // <0：当前对象比传入对象小。
        // =0：当前对象等于传入对象。
        // >0：当前对象比传入对象大。
        int	 s = this.getIdCard().length() - o.idCard.length();
        if(oConvertUtils.isNotEmpty(o.code)){
            s = this.code.length() - o.code.length();
        }
        return s;
    }

    @Override
    public String toString() {
        return "SigningMemberImportVo [code=" + code + ", name=" + name +  ", phone=" +  phone +", idCardType=" + idCardType + ", idCard=" + idCard + "]";
    }

}
